﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Axis.Web.Administrator.Global;
using Axis.BusinessObject.Core;
using Axis.Dao.Core;

namespace Axis.Web.Administrator.Views.Banner
{
    public partial class BannerList : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            string optCate = "";
            IList<CListData> allCate = new CCoreDao().GetListData(string.Format("<InputValue UserID='{0}' SecrectToken='{1}' FunctionCode='MenuCategoryAll'/>", CSecurity.USER_ID, CSecurity.SECRECT_TOKEN));
            foreach (var item in allCate)
            {
                if (item.ParentID > 0)
                    optCate += string.Format("<option value='{0}'>&nbsp;&nbsp;&nbsp;{1}</option>", item.Value, item.Name);
                else
                    optCate += string.Format("<option value='{0}' style=\"color:red\">{1}</option>", item.Value, item.Name);

            }
            lblOptionCate.Text = optCate;
        }
    }
}